﻿package emusic.api.clients 
{
	import emusic.ws.AbstractClient;
	import emusic.api.EMusicClient;
	import flash.net.URLRequest;
	import flash.net.URLRequestMethod;
	/**
	 * ...
	 * @author Martin Legris ( http://blog.martinlegris.com )
	 */
	public class AbstractEMusicClient extends AbstractClient
	{
		protected function createRequest(params:AbstractSearchRequest):URLRequest
		{
			var url:String = EMusicClient.baseUrl;
			url += params.requestUri;
			
			var request:URLRequest = new URLRequest(url);
			request.data = params.getVars();
			request.method = URLRequestMethod.GET;
			
			return request;
		}
	}
}